﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using YFrameWork.RunTime;

public class LoadTestGameObjectResources : MonoBehaviour
{
    ResourceComponent res;
    GameObject go;
    GameObject goIn;
    // Start is called before the first frame update
    void Start()
    {
        res = GameEntry.Instance.GetComponent<ResourceComponent>();
        go= res.LoadResource<GameObject>("asdasd");
        goIn =GameObject.Instantiate(go);
    }

    private void Update()
    {
        if (Input.GetKeyDown(KeyCode.A))
        {
            //Destroy(goIn);
            res.ReleaseResource(go,true);
            go = null;
        }
        if (Input.GetKeyDown(KeyCode.S))
        {
            go = res.LoadResource<GameObject>("asdasd");
        }


    }

}
